package com.easy.service.impl;

import com.easy.bean.Order;
import com.easy.dao.IInOrderDao;
import com.easy.service.IInOrderService;
import org.aspectj.weaver.ast.Or;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.List;

@Service
public class InOrderImpl implements IInOrderService{
    @Autowired
    private IInOrderDao dao;
    @Override
    public List<Order> getOrdersByInId(String in_id) {
        return dao.getOrdersByInId(in_id);
    }
    @Override
    public List<Order> getInOrder() {
        return dao.getInOrder();
    }

    @Override
    public List<Order> getShelfInOrder() {
        return dao.getShelfInOrder();
    }

    @Override
    public int addInOrder(Order order) {
        return dao.addInOrder(order);
    }

    @Override
    public int editInOrder(Order order) {
        return dao.editInOrder(order);
    }

    @Override
    public int delInOrder(int id) {
        return dao.delInOrder(id);
    }

    @Override
    public List<Order> searchInOrder(String keyword) {
        return dao.searchInOrder(keyword);
    }
    @Override
    public List<Order> getPagedInOrder(int page, int size) {
        int offset = (page - 1) * size; // 计算 offset
        return dao.getPagedInOrder(offset, size);
    }
    @Override
    public int getTotalInOrderCount() {
        return dao.getTotalInOrderCount();
    }

}
